/*
 * FileName: IndexController.java
 * Author:   zzw
 * Date:     2018年06月06日
 * Description:
 */
package com.chezhibao.trace.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * 〈〉<br>
 * 〈〉
 *
 * @author zzw
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本]（可选）
 */
@Controller
@CrossOrigin(origins = "*")
public class IndexController {

    @RequestMapping("/index")
    public String index(HttpServletRequest request,Model model){
        model.addAttribute("basePath", request.getRequestURL().toString().split("\\//")[1].split("\\/")[0]);
        return "index1";
    }
}
